home *** CD-ROM | disk | FTP | other *** search
- Path: mother.usf.edu!news
- From: yatesc@csee.usf.edu (Randy Yates)
- Newsgroups: comp.lang.c
- Subject: Re: Pointers to register
- Date: 26 Mar 1996 22:12:13 GMT
- Organization: University of South Florida
- Message-ID: <4j9q3t$kct@mother.usf.edu>
- References: <1239@altheim.win-uk.net><4iklpm$28s@sparcserver.lrz-muenchen.de> <1247@altheim.win-uk.net>
- NNTP-Posting-Host: ppp113.cfr.usf.edu
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.14
-
- In article <1247@altheim.win-uk.net>, broldham@altheim.win-uk.net says...
- >
- >
- >In article <4iklpm$28s@sparcserver.lrz-muenchen.de>, Kurt Watzka (watzka@stat.uni-muenchen.de) writes:
- >>broldham@altheim.win-uk.net (Brian R. Oldham) writes:
- >[...]
- >Yes Kurt, I think I've got the message by now. But where you guys keep
- >missing the point (like Nottm Forest kept missing the Bayern Munich
- >goalposts :-{ ) is that if declaration:
- >
- > *ptr = var;
- >
- >is wrong for other objects in memory
-
- It is? Who says?
-
- >then why does it work for:
- >
- > *ptr = union_member;
- >
- >And why does my compiler complain at the correct way:
- >
- > ptr = &union_member;
-
- These last two examples do different things: *ptr=union_member reads
- the data in union_member and writes it to the address stored in
- the pointer variable ptr; ptr=&union_member assigns the pointer variable
- the address of the union_member.
-
- >
- >
- >---
- >Brian Oldham
- >Hucknall UK
- >!...Gesundbrunnen
- >
- >
- >
- >
- >
- >
- >
- >
-
- --
- % Randy Yates % "...the answer lies within your soul
- % EE/Mathematics Student % 'cause no one knows which side
- % University of South Florida % the coin will fall."
- % <yatesc@csee.usf.edu> % 'Big Wheels', *Out of the Blue*, ELO
-
-